Skip to content

core: add debug log and repair the missing hash and receipts#35190

Merged
rjl493456442 merged 5 commits into
ethereum:masterfrom
rjl493456442:missinghash-log
Jun 23, 2026
Merged

core: add debug log and repair the missing hash and receipts#35190
rjl493456442 merged 5 commits into
ethereum:masterfrom
rjl493456442:missinghash-log

Conversation

@rjl493456442

@rjl493456442 rjl493456442 commented Jun 18, 2026

Copy link
Copy Markdown
Member

This PR improves the block download used by snap sync. Specifically, blocks and their associated data (receipts and canonical hash mappings) are now written directly to the database without checking existence.

The current implementation could fail in cases where the block header and body were already present (has.Block returns true), but the corresponding canonical hash mapping was missing. One possible scenario is when a newPayload event is processed without a subsequent forkChoiceUpdate.

It is still unclear why Geth may re-enter snap sync after Engine API events have been processed after the sync. Anyway, bypassing the existence is a reasonable change.

What's more, in the downloader, the presence of canonical hash is also considered for deciding the range of blocks to be downloaded. Specifically,

  • in the full sync, the block with header and body available but canonical hash missing will be re-inserted;
  • in the snap sync, the block with header, body and receipt available but canonical hash missing will be re-inserted;

@rjl493456442 rjl493456442 added this to the 1.17.5 milestone Jun 23, 2026
@rjl493456442 rjl493456442 merged commit 12241bd into ethereum:master Jun 23, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants